package com.zsrt.javaweb.ch01;

import org.springframework.stereotype.Component;

@Component
public class ArithmeticCalculateImpl implements ArithmeticCalculate {

	public int add(int x, int y) {
		
		int sum = x + y;
		System.out.println("[--执行核心业务方法--] sum="+sum);
		return sum;
	}

	public int sub(int x, int y) {
		int sub = x -y;
		System.out.println("[--执行核心业务方法--] sub="+sub);
		return sub;
	}

	public int mul(int x, int y) {
		int mul = x * y;
		System.out.println("[--执行核心业务方法--] mul="+mul);
		return mul;
	}

	public int div(int x, int y) {
		int div = x/y;
		System.out.println("[--执行核心业务方法--] div="+div);
		return div;
	}

}
